<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Update Function </title>
</head>

<body>
/**<br />
* <{$functionName}> ,<{$functionDescription}><br />
* <br />
* @param MySQLi $_dbObject  <br />
  <{foreach from=$whereStrs item=pa name=foo}>
* @param $<{$pa->valueName}><br />
  <{/foreach}>

* @return FALSE means error, other means the number of records which are affected<br />
 */<br />



 function <{$functionName}>(MySQLi $_dbObject <{foreach from=$whereStrs item=pa name=foo}>,$<{$pa->valueName}><{/foreach}>){<br />

 
$whereStr=&quot; where 1=1 &quot;;<br />
  <br />
  <{foreach from=$whereStrs item=wStr name=foo}>
   if(isset($<{$wStr->valueName}>) <{if $wStr->singleQuotes=="'"}> &amp;&amp; $<{$wStr->valueName}>!=&quot;&quot;<{/if}>){<br />
$whereStr.=sprintf(&quot; and `<{$wStr->fieldName}>` <{$wStr->operator}> 
   <{$wStr->singleQuotes}><{$wStr->likeHeadStr}><{$wStr->sprintfStr}><{$wStr->likeTailStr}><{$wStr->singleQuotes}>&quot;,
   <{if $wStr->escapeStr==1}>$this-&gt;escape_string(<{/if}>$<{$wStr->valueName}><{if $wStr->escapeStr==1}>)<{/if}>);<br />
<br />
<br />}<br />
<br />
 <{/foreach}>
<br />

$sql=&quot;delete from   &quot;.<{$tableObj->definedTableName}>.&quot;  <{$aliasName}>&quot;.$whereStr;<br />
//echo $sql.&quot;&lt;br //&gt;&quot;;<br />
<br />
<br />
$_re=$_dbObject-&gt;query($sql);<br />

if($_re!==FALSE){<br />
<br />
$re=$_dbObject-&gt;affected_rows;<br />
<br />
<br />
<br />}<br />
else{<br />
<br />
$re=FALSE;
<br />
<br />}<br />

<br />
  return $re;<br />
<br />
<br />}<br />



<br />
<br /></body>
</html>
